<?php
require("cfg.php");
require("function.php");
$sql="SELECT `search_word` , count( `search_word` )
FROM `search_record` 
GROUP BY `search_word` 
ORDER BY count( `search_word` ) DESC 
LIMIT 0 , 5";
$query=mysql_query($sql);
$top_search="";
while ($row = mysql_fetch_array($query)) {
	$tmp=$row['search_word'];
	$tmp=iconv("gb2312","utf-8",$tmp);
	$tmp_num=$row['count( `search_word` )'];
	$top_search.="<div class=\"top_search\">$tmp</div>";
}
$string= 
'<div class="top_played_and_commemd_body_search">
	<input  class="top_played_and_commemd_body_search_input" name="search_input" type="text" />
	<input class="top_played_and_commemd_body_search_submit" name="submit_search" type="button" value="search" />
	<div class="top_played_and_commemd_body_search_top_search">
	'.$top_search.'
	</div>
</div>
<form id="top_played" action="" method="post" name="top_played_form">
</form>';
echo $string;
?>